<!DOCTYPE html>
<html>
<head>
  <meta charset="utf-8">
  <meta http-equiv="X-UA-Compatible" content="IE=edge">
  <title>后台管理面板</title>
  <!-- 告诉浏览器该页面是自适应布局 -->
  <meta content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no" name="viewport">
  {include file="../application/admin/view/index/top.html" /}
</head>
<body class="hold-transition skin-blue sidebar-mini">	
<div class="wrapper">
    <div class="content-wrapper" style="margin-left: 0 !important;">
        <!--页眉-->
        <section class="content-header">
          <h1>配置修改</h1>
        </section>
        <!--内容开始-->
        <section class="content">
            <div class="search">
            	<form class="form-inline" action="">
                 <input class="btn btn-flat btn-primary m_10_l_0" onclick="location.href='{:url('index')}'" type="button" value="显示全部">
                 <a class="btn btn-flat btn-success m_10 f_r" onclick="javascript :history.back(-1)"><i class="fa fa-undo m-r-10"></i>返 回</a>  
            	</form> 
            </div>
            <!--数据表开始-->
            <form method="post" action="{:url('configPost')}">
                <input type="hidden" name="name" value="{$addon.info.name}"/>
            <!---->
            <div class="row">
                <div class="col-sm-12 col-xs-12">
                	<div class="box box-body">
                    	<table class="table table-bordered table-hover">
                        <tr>
                          <th class="t_c">配置选项</th>
                          <th class="t_c">配置值</th>
                        </tr>
                    	{foreach $addon.config as $k=>$item}
                        <tr>
                          <td class="t_c">{$item.title}</td>
                          <td>
                        	{switch $item.type}
                            	{case string}
                        			<input type="text" name="row[{$k}]" value="{$item.value}" class="form-control"/>
                        		{/case}
                                 {case text}
                        			<textarea name="row[{$k}]" class="form-control" rows="3" >{$item.value}</textarea>
                        		{/case}
                                {case radio}
                                    {foreach name="item.options" item="vo"}
                                    	<label for="row[{$k}]-{$key}">
                                    		<input id="row[{$k}]-{$key}" name="row[{$k}]" type="radio" value="{$key}" {in name="key" value="$item.value" }checked{/in} /> {$vo} </label>
                                    {/foreach}
                        		{/case}
                                {case checkbox}
                                {foreach name="item.options" item="vo"}
                                	<label for="row[{$k}][]-{$key}">
                                    	<input id="row[{$k}][]-{$key}" name="row[{$k}][]" type="checkbox" value="{$key}" {in name="key" value="$item.value" }checked{/in} /> {$vo} </label>
                                {/foreach}
                                {/case}
                                {case value="select"}
                                <select name="row[{$k}][]" class="form-control">
                                    {foreach name="item.options" item="vo"}
                                    <option value="{$key}" {in name="key" value="$item.value" }selected{/in}>{$vo}</option>
                                    {/foreach}
                                </select>
                                {/case}
                            	{default /}
                                {$item.value}
                        	{/switch}
                          </td>  
                        </tr>
                        {/foreach}
                        </table>
                    		
                    
                    
                            
			                <div class="row dd_input_group">
			                	<div class="form-group">
				                  <label class="col-sm-1 col-xs-4 control-label"></label>
				                  <div class="col-sm-4 col-xs-8">
				                    	<button type="submit" class="btn btn-flat btn-primary ">提 交</button> 
				                    	<button type="button" class="btn btn-flat btn-default" onclick="javascript :history.back(-1)">返 回</button>
				                  </div>
		
				                </div>
			                </div>
                 </div>
                  <!-- /.box -->
                </div>
              </div>
              </form>
            <!--数据表结束-->
        </section>
        <!-- right col -->
      </div>
      <!-- /.row (main row) -->

    </section>
        <!--内容结束-->
    </div>
</div>
{include file="../application/admin/view/index/bottom.html" /}
</body>
</html>    